package com.atguigu.java;

import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;

/**
 * ClassName: StringTest
 * Description:
 * Date: 2021/3/9 19:57
 * Company: TravelSky
 *
 * @author YangXin
 */
public class StringTest {

    static char[] chars = {'t','e','s','t'};

    public static void valueCross(int age, String weight,char[] ch) {
        System.out.println("传入的age值：" + age);
        System.out.println("传入的weight值：" + weight);
        age = 23;
        weight = "py";
        ch[0] = 'b';
        System.out.println("修改后的age值：" + age);
        System.out.println("修改后的weight值：" + weight);

    }

    public static void main(String[] args) {
        int age = 10;
        String weight= "java";
        valueCross(age, weight,StringTest.chars);
        System.out.println("方法执行后的age：" + age);
        System.out.println("方法执行后的weight：" + weight);
        System.out.println("方法执行后的chars：" + Arrays.toString(chars));
        Map<String,String> map = new HashMap<String,String>();

        map.put("1","qqq");
        map.put("1",null);
        map.put("2",null);
        map.get("1");
        map.get("2");
        System.out.println(map.remove("1"));
        System.out.println(map.remove("2"));


    }

}
